package org.apache.commons.graph.visitor

import com.gitee.wsl.func.consumer.Consumer

interface IOutwardEdgeVisitor<V, E> {
    fun getOutwardEdges(source: V): List<E>

    fun forEachOutwardEdge(source: V, action: Consumer<E>) {
        val edges = getOutwardEdges(source)
        for (edge in edges) {
            action.accept(edge)
        }
    }
}